import { defineConfig  } from 'vite'
import vue from '@vitejs/plugin-vue'
//路径处理模块
import { resolve } from "path";

// https://vitejs.dev/config/
export default defineConfig({
  resolve: {
    alias: {
      "@": resolve(__dirname, ".", "src"),
    }
  },
  define: {
    'process.env': {
      // VUE_APP_BASE_API: 'http://localhost:3300'
      // VUE_APP_BASE_API: 'http://121.43.38.11:3300'
    }
  },
  // vite2.x
  css: {
    preprocessorOptions: {
      scss: {
        javascriptEnabled: true,
        additionalData: `$injectedColor: orange;`
      }
    },
  },
  plugins: [vue()]
})

